import request from '@/utils/request'

export let GetSysUserPage = (pageNum, pageSize, sysUserDto) => {
  return request({
    url: `/admin/system/user/getPage/${pageNum}/${pageSize}`,
    method: 'get',
    params: sysUserDto,
  })
}

export const DeleteUserById = id => {
  return request({
    url: `/admin/system/user/deleteById/${id}`,
    method: 'DELETE',
  })
}

export const GetUserById = id => {
  return request({
    url: `/admin/system/user/getById/${id}`,
    method: 'GET',
  })
}
export const UpdateUserById = user => {
  return request({
    url: `/admin/system/user/updateById`,
    method: 'put',
    data: user,
  })
}
export const SaveUser = user => {
  return request({
    url: `/admin/system/user/save`,
    method: 'post',
    data: user,
  })
}
